package com.xbongbong.paas.pojo;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author 李翔
 * @date 2022/8/16
 * @description
 */
@Getter
@Setter
@ToString
public class AttrValuePojo {

    /**
     * 更新的字段
     */
    @NotBlank(message = "{dto.msg.AttrValuePojo.attr.NotBlank}")
    private String attr;
    /**
     * 更新的值
     */
    @NotNull(message = "{dto.msg.AttrValuePojo.value.NotNull}")
    private Object value;

    /**
     * logFieldEditedList 会有attrName， 注：fieldEditedList没有
     */
    private String attrName;

    public AttrValuePojo() {
    }

    public AttrValuePojo(@NotBlank(message = "{dto.msg.AttrValuePojo.attr.NotBlank}") String attr, @NotNull(message = "{dto.msg.AttrValuePojo.value.NotNull}") Object value, String attrName) {
        this.attr = attr;
        this.value = value;
        this.attrName = attrName;
    }
}
